Optimal. Leaf size=152 \[ -\frac{\left (a^2+8 b^2\right ) \cos ^7(c+d x)}{252 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}+\frac{a b \sin (c+d x) \cos ^5(c+d x)}{24 d}+\frac{5 a b \sin (c+d x) \cos ^3(c+d x)}{96 d}+\frac{5 a b \sin (c+d x) \cos (c+d x)}{64 d}+\frac{5 a b x}{64} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.212379, antiderivative size = 152, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.148, Rules used = {2862, 2669, 2635, 8} \[ -\frac{\left (a^2+8 b^2\right ) \cos ^7(c+d x)}{252 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}+\frac{a b \sin (c+d x) \cos ^5(c+d x)}{24 d}+\frac{5 a b \sin (c+d x) \cos ^3(c+d x)}{96 d}+\frac{5 a b \sin (c+d x) \cos (c+d x)}{64 d}+\frac{5 a b x}{64} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2862
Rule 2669
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \cos ^6(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx &=-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}+\frac{1}{9} \int \cos ^6(c+d x) (2 b+2 a \sin (c+d x)) (a+b \sin (c+d x)) \, dx\\ &=-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}+\frac{1}{72} \int \cos ^6(c+d x) \left (18 a b+2 \left (a^2+8 b^2\right ) \sin (c+d x)\right ) \, dx\\ &=-\frac{\left (a^2+8 b^2\right ) \cos ^7(c+d x)}{252 d}-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}+\frac{1}{4} (a b) \int \cos ^6(c+d x) \, dx\\ &=-\frac{\left (a^2+8 b^2\right ) \cos ^7(c+d x)}{252 d}+\frac{a b \cos ^5(c+d x) \sin (c+d x)}{24 d}-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}+\frac{1}{24} (5 a b) \int \cos ^4(c+d x) \, dx\\ &=-\frac{\left (a^2+8 b^2\right ) \cos ^7(c+d x)}{252 d}+\frac{5 a b \cos ^3(c+d x) \sin (c+d x)}{96 d}+\frac{a b \cos ^5(c+d x) \sin (c+d x)}{24 d}-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}+\frac{1}{32} (5 a b) \int \cos ^2(c+d x) \, dx\\ &=-\frac{\left (a^2+8 b^2\right ) \cos ^7(c+d x)}{252 d}+\frac{5 a b \cos (c+d x) \sin (c+d x)}{64 d}+\frac{5 a b \cos ^3(c+d x) \sin (c+d x)}{96 d}+\frac{a b \cos ^5(c+d x) \sin (c+d x)}{24 d}-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}+\frac{1}{64} (5 a b) \int 1 \, dx\\ &=\frac{5 a b x}{64}-\frac{\left (a^2+8 b^2\right ) \cos ^7(c+d x)}{252 d}+\frac{5 a b \cos (c+d x) \sin (c+d x)}{64 d}+\frac{5 a b \cos ^3(c+d x) \sin (c+d x)}{96 d}+\frac{a b \cos ^5(c+d x) \sin (c+d x)}{24 d}-\frac{a \cos ^7(c+d x) (a+b \sin (c+d x))}{36 d}-\frac{\cos ^7(c+d x) (a+b \sin (c+d x))^2}{9 d}\\ \end{align*}
Mathematica [A] time = 0.999239, size = 161, normalized size = 1.06 \[ -\frac{126 \left (10 a^2+3 b^2\right ) \cos (c+d x)+84 \left (9 a^2+2 b^2\right ) \cos (3 (c+d x))+252 a^2 \cos (5 (c+d x))+36 a^2 \cos (7 (c+d x))-504 a b \sin (2 (c+d x))+252 a b \sin (4 (c+d x))+168 a b \sin (6 (c+d x))+\frac{63}{2} a b \sin (8 (c+d x))-1260 a b c-1260 a b d x-27 b^2 \cos (7 (c+d x))-7 b^2 \cos (9 (c+d x))}{16128 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 115, normalized size = 0.8 \begin{align*}{\frac{1}{d} \left ( -{\frac{{a}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{7}}+2\,ab \left ( -1/8\,\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{7}+1/48\, \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{5}+5/4\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{15\,\cos \left ( dx+c \right ) }{8}} \right ) \sin \left ( dx+c \right ) +{\frac{5\,dx}{128}}+{\frac{5\,c}{128}} \right ) +{b}^{2} \left ( -{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{9}}-{\frac{2\, \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{63}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.986414, size = 124, normalized size = 0.82 \begin{align*} -\frac{4608 \, a^{2} \cos \left (d x + c\right )^{7} - 21 \,{\left (64 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 120 \, d x + 120 \, c - 3 \, \sin \left (8 \, d x + 8 \, c\right ) - 24 \, \sin \left (4 \, d x + 4 \, c\right )\right )} a b - 512 \,{\left (7 \, \cos \left (d x + c\right )^{9} - 9 \, \cos \left (d x + c\right )^{7}\right )} b^{2}}{32256 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.8221, size = 261, normalized size = 1.72 \begin{align*} \frac{448 \, b^{2} \cos \left (d x + c\right )^{9} - 576 \,{\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{7} + 315 \, a b d x - 21 \,{\left (48 \, a b \cos \left (d x + c\right )^{7} - 8 \, a b \cos \left (d x + c\right )^{5} - 10 \, a b \cos \left (d x + c\right )^{3} - 15 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4032 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 22.4536, size = 282, normalized size = 1.86 \begin{align*} \begin{cases} - \frac{a^{2} \cos ^{7}{\left (c + d x \right )}}{7 d} + \frac{5 a b x \sin ^{8}{\left (c + d x \right )}}{64} + \frac{5 a b x \sin ^{6}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac{15 a b x \sin ^{4}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{32} + \frac{5 a b x \sin ^{2}{\left (c + d x \right )} \cos ^{6}{\left (c + d x \right )}}{16} + \frac{5 a b x \cos ^{8}{\left (c + d x \right )}}{64} + \frac{5 a b \sin ^{7}{\left (c + d x \right )} \cos{\left (c + d x \right )}}{64 d} + \frac{55 a b \sin ^{5}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{192 d} + \frac{73 a b \sin ^{3}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{192 d} - \frac{5 a b \sin{\left (c + d x \right )} \cos ^{7}{\left (c + d x \right )}}{64 d} - \frac{b^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{7}{\left (c + d x \right )}}{7 d} - \frac{2 b^{2} \cos ^{9}{\left (c + d x \right )}}{63 d} & \text{for}\: d \neq 0 \\x \left (a + b \sin{\left (c \right )}\right )^{2} \sin{\left (c \right )} \cos ^{6}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20556, size = 238, normalized size = 1.57 \begin{align*} \frac{5}{64} \, a b x + \frac{b^{2} \cos \left (9 \, d x + 9 \, c\right )}{2304 \, d} - \frac{a^{2} \cos \left (5 \, d x + 5 \, c\right )}{64 \, d} - \frac{a b \sin \left (8 \, d x + 8 \, c\right )}{512 \, d} - \frac{a b \sin \left (6 \, d x + 6 \, c\right )}{96 \, d} - \frac{a b \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac{a b \sin \left (2 \, d x + 2 \, c\right )}{32 \, d} - \frac{{\left (4 \, a^{2} - 3 \, b^{2}\right )} \cos \left (7 \, d x + 7 \, c\right )}{1792 \, d} - \frac{{\left (9 \, a^{2} + 2 \, b^{2}\right )} \cos \left (3 \, d x + 3 \, c\right )}{192 \, d} - \frac{{\left (10 \, a^{2} + 3 \, b^{2}\right )} \cos \left (d x + c\right )}{128 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]